#!coding=utf-8
import os
import threading
import time

def thread_function1():
    print('thread_function1 ' + str(threading.get_ident()) + " start")
    time.sleep(60)
    print('thread_function1 ' + str(threading.get_ident()) + " end")


def thread_function2():
    print('thread_function1 ' + str(threading.get_ident()) + " start")
    while True:
        pass
        # time.sleep(1)
    print('thread_function1 ' + str(threading.get_ident()) + " end")


if __name__ == '__main__':
    print('主线程开始, PID=' + str(os.getpid()))
    t1 = threading.Thread(target=thread_function1)
    t1.start()

    t2 = threading.Thread(target=thread_function2)
    t2.start()

    time.sleep(10)
    print('主线程结束')